﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using BusinessObjectHelper;

namespace Dzzzr
{
  [DataObject(true)]
  public partial class Entity : INotifyPropertyChanging, INotifyPropertyChanged
  {

    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);

    private int _ID;

    private string _Name;

    private string _Description;

    private int _TeamID;

    private byte[] _Photo;

    private int _EntityTypeID;

    private string _EntityTypeName;

    public Entity()
    {
      this.Initialize();
    }
		[DataMapping(-1)]
    public int ID
    {
      get
      {
        return this._ID;
      }
      set
      {
        if ((this._ID != value))
        {
          this.SendPropertyChanging();
          this._ID = value;
          this.SendPropertyChanged("ID");
        }
      }
    }

		[DataMapping("")]
		public string Name
    {
      get
      {
        return this._Name;
      }
      set
      {
        if ((this._Name != value))
        {
          this.SendPropertyChanging();
          this._Name = value;
          this.SendPropertyChanged("Name");
        }
      }
    }

		[DataMapping("")]
		public string Description
    {
      get
      {
        return this._Description;
      }
      set
      {
        if ((this._Description != value))
        {
          this.SendPropertyChanging();
          this._Description = value;
          this.SendPropertyChanged("Description");
        }
      }
    }

		[DataMapping(-1)]
		public int TeamID
    {
      get
      {
        return this._TeamID;
      }
      set
      {
        if ((this._TeamID != value))
        {
          this.SendPropertyChanging();
          this._TeamID = value;
          this.SendPropertyChanged("TeamID");
        }
      }
    }

    public byte[] Photo
    {
      get
      {
        return this._Photo;
      }
      set
      {
        if ((this._Photo != value))
        {
          this.SendPropertyChanging();
          this._Photo = value;
          this.SendPropertyChanged("Photo");
        }
      }
    }

		[DataMapping(-1)]
		public int EntityTypeID
    {
      get
      {
        return this._EntityTypeID;
      }
      set
      {
        if ((this._EntityTypeID != value))
        {
          this.SendPropertyChanging();
          this._EntityTypeID = value;
          this.SendPropertyChanged("EntityTypeID");
        }
      }
    }

		[DataMapping("")]
		public string EntityTypeName
    {
      get
      {
        return this._EntityTypeName;
      }
      set
      {
        if ((this._EntityTypeName != value))
        {
          this.SendPropertyChanging();
          this._EntityTypeName = value;
          this.SendPropertyChanged("EntityTypeName");
        }
      }
    }


    public event PropertyChangingEventHandler PropertyChanging;

    public event PropertyChangedEventHandler PropertyChanged;

    protected virtual void SendPropertyChanging()
    {
      if ((this.PropertyChanging != null))
      {
        this.PropertyChanging(this, emptyChangingEventArgs);
      }
    }

    protected virtual void SendPropertyChanged(String propertyName)
    {
      if ((this.PropertyChanged != null))
      {
        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
      }
    }

    private void Initialize()
    {
    }

  }
}
